Method and apparatus for determining transitions between relatively high and low levels in an input signal

ABSTRACT

A method and apparatus for determining the transitions between binary levels of an input signal such as a scanned bar code label by detecting zero crossings of an approximated second derivative of the input signal. Samples of the input signal are obtained by using delay lines, sample-and-hold circuits, an analog shift register or similar device. The first derivative of the signal is approximated by the slope of a straight line between two sampled points on the waveform. The second derivative is approximated by the difference between two first derivatives. Zero crossings of the second derivative indicating transitions of the input signal may be determined either by detecting a signal peak on both sides of the zero crossing, or by comparing the second derivative signal to zero when the first derivative exceeds a positive or negative threshold. The amount of shift in the zero crossings may be estimated by measuring relative amplitudes or widths of the surrounding signal lobes. The time between sample points may be adjusted to match a particular range setting of a scanner having a plurality of range settings.

This is a divisional of co-pending application Ser. No. 08/548,436 filed Oct. 26, 1995.

FIELD OF THE INVENTION

The field of the present invention relates to signal processing and, more particularly, to a method and apparatus for determining the occurrence of transitions in a binary encoded input signal such as a scanned bar code label.

BACKGROUND OF THE INVENTION

Signals having transitions between binary levels are generated from many different devices. For example, optical scanners have been used to read encoded information on bar code labels and generate analog signals comprised of substantially binary levels. Bar codes typically consist of a series of parallel light and dark rectangular areas of varying widths. The light areas are often referred to as "spaces" and the dark areas as "bars". Different widths of bars and spaces are selected in order to define different characters of a bar code.

A bar code label is typically read by a scanner which detects reflected and/or diffracted light from the bars and spaces comprising the characters. One common method of illuminating the bar code label is by use of a scanning laser beam, in which case the reflected light is detected by an optical detector. The detector generates an electrical signal having an amplitude determined by the intensity of the collected light. Another method for illuminating the bar code label is by use of a uniform light source with an array of optical detectors connected to an analog shift register (commonly called a charge-coupled device or CCD). In such a technique, as with a scanning laser, an electrical signal is generated having an amplitude determined by the intensity of the collected light. In either the scanning laser or CCD technique, the amplitude of the electrical signal has one level for dark bars and a second level for light spaces. The precise amplitudes of the two levels, however, are not known prior to scanning. As a label is scanned, positive-going transitions and negative-going transitions in the electrical signal occur, signifying transitions between bars and spaces. The transitions in the electrical signal are not perfectly sharp but may be gradual or noisy, thus making it difficult to determine the precise instant at which the transition has occurred. Inaccuracies in determining transition points may cause a bar code label to be misread.

Several techniques in signal processing have been developed for the purpose of determining transitions with greater accuracy. One such technique involves the detection of zero crossings of the second time derivative of the input signal. The benefits of using a second derivative signal processing method for bar code readers are well known and are set forth, for example, in U.S. Pat. No. 4,000,397 entitled "Signal Processor Method and Apparatus" (issued Dec. 28, 1976).

Derivatives of the input signal in scanning systems are typically generated in an analog fashion by RC circuits. Differentiation circuits for obtaining analog derivatives of the input signal are well known by those skilled in the art and primarily comprise one or more operational amplifiers along with resistors and capacitors. Such differentiation circuits implement for the first derivative a transfer function having a zero at the origin and a single pole chosen beyond the highest frequency of interest. For the second derivative, such circuits implement a transfer function having two zeros at the origin and two poles chosen beyond the highest frequency of interest.

As the demand for accuracy and versatility in scanners continues to grow, conventional implementation methods of the second derivative technique may experience limitations. One such limitation is the ability to reject noise in the high frequency regions. As system performance is strongly affected by noise present in such regions, conventional implementations usually require the addition of a relatively complex low pass filter in the signal processing chain. Further, susceptibility to noise interference is affected by the fact that, while noise power tends to increase at higher frequencies, input signal power tends to roll off at such frequencies. The differentiation operation used in the conventional method to obtain the first or second derivative signals provides little or no attenuation outside the bandwidth of interest (i.e., the frequency band that contains most of the energy resulting from the light reflected from the symbol) and is therefore susceptible to high frequency noise.

A second limitation, related to the first, is that the conventional differentiator circuit does not exhibit flat group delay, or linear phase response, over the frequency band of interest. Group delay may be defined as the delay time of a circuit or system at various frequency values. A system exhibiting "flat" group delay has a relatively uniform delay time over the bandwidth of interest. Such a system is therefore said to have linear phase response. A system that does not exhibit flat group delay has relatively nonuniform or varying delay times dependent upon input signal frequency. Such a system is therefore said to have nonlinear phase response. Bar code scanner systems utilizing conventional differentiator circuits may, as a result of not having flat group delay, distort pulse shapes leading to errors in detecting pulse widths.

This type of distortion may be illustrated with reference to FIG. 1. FIG. 1 is a graph comparing the output O₁ of a low pass filter having nonconstant group delay compared to the output O₂ of an ideal filter having linear phase response or constant group delay in response to an input pulse P. The output O₁ of the filter with nonconstant group delay exhibits asymmetry and over/undershoot resulting from a nonlinear phase characteristic, possibly leading to incorrect or unsuccessful decoding of the symbol. To avoid distorting the shapes of pulses that occur in a bar code signal processing system, it is thus highly desirable that the entire system exhibit linear phase response or, equivalently, constant group delay.

Another related problem may occur while attempting to detect the zero crossings of the second derivative signal. Typically, the first derivative of the input signal is looked to in order to determine the time periods during which a valid zero crossing of the second derivative signal may occur. Zero crossings of the second derivative signal are considered valid if occurring during a portion of the first derivative signal peak. However, a common problem in conventional systems is that the first and second derivative signals are not properly aligned in time because of temperature and frequency dependent delays in the first and second differentiator circuitry. Significant misalignment of the first and second derivative signals may occur causing missed zero crossings or detection of false zero crossings of the second derivative signal.

Further problems have been created by increasing demand for greater depth of field in handheld scanners. Greater depth of field requirements result in a larger range of signal amplitudes leading to the potential for clipping of the input signals or derivative signals. Clipping typically occurs when a signal is limited by a positive or negative voltage supply level. Although enlarging the supply voltage may increase the dynamic range of operation and thereby minimize clipping, there is also a benefit in keeping power and voltage levels low to accommodate smaller, lighter and cheaper handheld scanners. Moreover, greater depth of field in scanners further accentuates the noise problems mentioned above as higher frequencies are generated as a result of using smaller labels and reading labels at longer distances. Reading labels at longer distances also reduces the strength of the input signal thus increasing the need to reduce the effects of noise.

SUMMARY OF THE INVENTION

The present invention provides a method and apparatus for detecting the transitions between binary levels of an input signal. The preferred method of the invention is based on approximating the derivative operation with the mathematical operation:

    F(t)-F(t-D)

where F(t) is the electrical signal that represents the reflected light from the symbol, t is the time variable and D is a fixed time delay. The derivative of the signal is in effect approximated by the slope of a straight line between two points on the waveform separated by the delay time D.

In one embodiment the delayed version of the signal is obtained from a circuit element known as a delay line. A primary benefit of this technique is that delay lines, by definition, have constant group delay (and therefore linear phase) over the entire range of operation. The frequency response of the delay line differentiator is a periodic type response (often called a "comb" filter). The first null in the response is given by the formula f(min)=1/D where D is the delay time of the delay element and f(min) is in Hertz. If the delay time is chosen so that the frequency response has begun to decrease immediately beyond the frequencies of interest, the system has the advantageous property of reducing the amplitude of high frequency noise components while performing the differentiating function. In addition, as mentioned above, such filtering is done with completely linear phase.

The above concepts are further extended to obtain a second derivative signal using two delay elements. The signals entering the circuit, exiting the first delay element and exiting the second delay element are referred to as A, B and C respectively. The numerical approximation to the first derivative is the difference between two adjacent samples or A-B. Another approximate first derivative is calculated by B-C. An approximation of the second derivative is calculated from the difference between the two first derivatives, or:

    (A-B)-(B-C)=A+C2B

A summing amplifier may be used to perform the arithmetic operations to produce an approximation to the second derivative. The frequency response of this delay line second derivative circuit is also of a comb filter variety and has the advantageous property of reducing the amplitude of high frequency noise components while performing the differentiating function.

Once the second derivative signal is obtained in the above fashion, transitions between spaces and bars may be determined by locating the zero crossings of the second derivative signal in a manner such as that used in U.S. Pat. No. 4,000,397, incorporated herein by reference, or by various other techniques further explained herein. An important benefit of delay line differentiation is that, by virtue of the fixed delay intervals, the first and second derivatives are properly aligned in time such that the peak amplitude of the first derivative may be used to assist detection of the second derivative zero crossings. A further advantage of the above technique is the ability to maintain a suitable dynamic range of operation while minimizing sensitivity to clipping of signal amplitudes. Dynamic range is improved because the second derivative signal is derived independently from the first derivative signal; thus, clipping of the first derivative signal will not affect the precision of the second derivative signal.

An embodiment may also include an additional low pass filter in the system for attenuating any undesired high frequency noise beyond the bandwidth of interest. Such a filter need not have linear phase response beyond the bandwidth of interest and may therefore be a simple, well known filter type (such as a four-pole transitional Gaussian 12-dB) without degrading the shape of the signal pulses and providing, in combination with the delay line differentiator, superior overall system frequency response and group delay characteristics.

In another embodiment of the present invention the delay elements may be implemented as active all pass filters and therefore have the advantage of being easily adjusted to compensate for phase nonlinearities that arise in other parts of the system. In yet another embodiment, the delay periods may be adjustable so as to enable accurate scanning over a greater depth of field.

A zero crossing detector is provided in one embodiment whereby a valid zero crossing is determined by detecting a preceding signal peak and a subsequent, opposite-polarity signal peak of a minimum amplitude a predefined distance surrounding the zero crossing. In a particular version of this embodiment, the second derivative signal is applied to a series of two delay elements. The output of the first delay element is tested for zero crossings, while the input to the delay element series and the output of the delay element series are tested for positive and negative signal peaks meeting the specified criteria.

In several variations of the above embodiment, means are provided to compensate for intersymbol interference. In one variation, the peak signal values are measured and used to derive an estimate of the slope of the second derivative signal at the zero crossing. The calculated slope is applied to a look-up table to obtain a zero-crossing correction factor. In another variation, the peak signal values are compared. The difference value is applied to a look-up table to obtain a zero-crossing correction factor. In another variation, relative widths of the positive and negative signal pulses are compared. The difference value may be applied to a look-up table to obtain a zero-crossing correction factor, or may be halved and used as an estimate of zero crossing displacement.

The foregoing and other objects, features, and advantages of the invention will become apparent from the following more detailed description set forth in conjunction with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a graph comparing the outputs of a linear phase and nonlinear phase low pass filter circuit when provided with a pulse input.

FIG. 2a is a system diagram of a preferred embodiment in accordance with the present invention.

FIG. 2b is a graph of waveforms representative of the operation of the system of FIG. 2a.

FIG. 2c is a graph of waveforms showing the relative time alignment of the first and second derivative signals in a conventional signal processing system when misalignment occurs.

FIG. 2d is a graph of waveforms representative of the operation of a system in FIG. 2a when clipping of the first derivative signal occurs.

FIG. 2e depicts waveforms showing distortion of the second derivative signal in a conventional signal processing system when clipping of the first derivative signal occurs.

FIGS. 3a-3f are detailed schematics of the system in FIG. 2a.

FIG. 3g is a system diagram of a preferred embodiment of the present invention incorporating the detailed circuits depicted in FIGS. 3a-3f.

FIGS. 4a and 4b are graphs comparing the logarithmic and linear frequency responses, respectively, of a delay line differentiator with that of a conventional differentiator.

FIGS. 5a and 5b are graphs comparing the logarithmic and linear frequency responses, respectively, of a delay line double differentiator of the system in FIG. 2a that of a conventional second derivative circuit.

FIG. 6a is a graph comparing the delay time responses of a delay line differentiator with that of a conventional analog differentiator circuit.

FIG. 6b is a graph comparing the delay time responses of a delay line double differentiator of the system in FIG. 2a with that of a conventional analog double differentiator circuit.

FIG. 7 is a graph showing the frequency response of a typical Gaussian 12-dB low pass filter.

FIG. 8a is a graph comparing the frequency response of a delay line differentiator according to the present invention with a conventional analog differentiator circuit after addition of the low pass filter stage of FIG. 7.

FIG. 8b is a graph comparing the frequency response of a delay line double differentiator of the system in FIG. 2a with a conventional analog double differentiator circuit after addition of the low pass filter stage of FIG. 7.

FIG. 9a is a block diagram of a circuit using delay lines to detect zero crossings of a signal.

FIG. 9b is a waveform diagram illustrating the operation of the circuit shown in FIG. 9a.

FIG. 9c is a waveform diagram depicting asymmetries caused by intersymbol interference.

FIG. 10 is a timing diagram for the embodiment of FIG. 9a.

FIG. 11 is a graph showing a range of phase compensation (i.e., group delay adjustment) by adjustment of resistive components.

FIG. 12 is a system diagram of an alternative embodiment of the present invention wherein zero crossing of the second derivative are determined without generating a first derivative of the input signal.

FIG. 13a is a block diagram showing an alternative embodiment of the present invention with sample-and-hold circuits.

FIGS. 13b-d are more detailed schematics of the alternative embodiment shown in FIG. 13a.

FIGS. 13e-f are timing diagrams used in conjunction with the alternative embodiment shown in FIG. 13b.

FIG. 14 is a block diagram of an embodiment of the present invention employing a plurality of delay lines to generate a more precise approximation of a second derivative from a sampled input signal.

FIG. 15 is a block diagram of an alternative embodiment of the present invention including a scanner having a plurality of range settings and having delay periods adjustable to a particular range setting.

FIGS. 16a-16c are waveform diagrams showing the effect of intersymbol interference.

FIG. 17 is a block diagram of a circuit for determining the shift in a zero crossing point due to intersymbol interference.

FIG. 18 is a block diagram of another circuit for determining the shift in a zero crossing point due to intersymbol interference.

FIGS. 19-21 are waveform diagrams illustrating the principles behind several of the disclosed techniques for correcting shift in the zero crossing point.

FIG. 22 is a block diagram of a third circuit for determining the shift in a zero crossing point due to intersymbol interference.

FIG. 23 is a diagram showing application of a correction factor to correct shift in the measured zero crossing point.

FIG. 24 is a block diagram of a fourth circuit for determining the shift in a zero crossing point due to intersymbol interference.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

The preferred embodiments will now be described in reference to the drawings. FIG. 2a is a system diagram of a preferred signal processor. The operation of the system shown in FIG. 2a is explained in part with reference to the waveforms shown in FIG. 2b. When a bar code label (not shown) is read, an optical detector 1 detects light from the bars and spaces comprising the characters. The optical detector 1 generates an electrical input signal Vin having an amplitude determined by the intensity of reflected light incident upon the optical detector 1. The amplitude of the input signal Vin, as shown in FIG. 2b, generally has one level L1 for dark bars and a second level L2 for light spaces. The precise amplitudes of those levels L1 and L2 are typically unknown. The positive-going transitions and negative-going transitions of input signal Vin thus signify transitions between bars and spaces. The transitions in the input signal Vin are not perfectly sharp but may be gradual or have high frequency noise, thus making it difficult to determine the precise instant at which the transition has occurred.

The input signal Vin is sent from the optical detector 1 to a low-pass filter 2. The low-pass filter 2 is connected to a first delay element 3 which is in turn connected to a second delay element 4. The outputs of the low-pass filter 2 and the second delay element 4 are connected to a first summing circuit 5. The outputs of the low-pass filter 2 and both delay elements 3 and 4 are also connected to a second summing circuit 6. The summing blocks 5 and 6, as described in more detail herein, operate on those signals to produce an approximate first derivative signal V1 and an approximate second derivative signal V2, respectively, as shown on FIG. 2b. The first derivative signal V1 is sent to a peak detector 7. The output of the peak detector 7 and the approximate first and second derivative signals V1 and V2 are sent to a zero crossing detector 8 in order to determine zero crossings of the second derivative signal V2 in a manner described in more detail herein. The zero crossing detector 8 sends information to decoding logic 9 which decodes the bar code label.

A more detailed embodiment is shown in FIGS. 3a-3f. Referring to FIG. 3a, the signal on input line 21 corresponds to Vin on FIG. 2a and is thus representative of an encoded analog signal such as may be generated by detecting reflected light from a bar code symbol that has been scanned by a moving laser beam. The frequency of the signal on input line 21 is generally a function of various factors including spot size, the angular velocity of the scanning beam, the distance of the label from the scanner, and the size of the label. In the case of a CCD scanner, the input frequency is proportional to the frequency of the clock driving the CCD device. The typical range of frequency varies from 1 kHz to 100 kHz.

The signal on input line 21 is connected to a low pass filter such as a four-pole transitional Gaussian 12-dB filter 21 having a breakpoint at approximately 85 kHz. Such a filter is of a relatively simple and well-known design (see, e.g., Arthur Williams, "Filter Design Handbook" (1981)) and exhibits fairly constant group delay over the low frequency bandwidth of interest, after which the frequency response drops off steeply and group delay is no longer constant. The four-pole transitional Gaussian 12-dB filter 22 is comprised of two similar stages involving operational amplifiers X9 and X10, which in one embodiment are model type TLC272 as manufactured by Texas Instruments. The output of the operational amplifier X10 provides a filtered input signal on line 23. The function of the filter 22 in conjunction with the rest of the system will be more fully explained later.

The filtered input signal on line 23 then enters a first delay element 24 which delays the signal on line 23 for an amount of time such as 2.75 microseconds. The first delayed signal on line 25 at the output of the first delay element 24 then enters a second delay element 26 which delays the first delayed signal on line 25 for another amount of time such as 2.75 microseconds. The output from second delay element 26 is a second delayed signal on line 27.

The delay elements 24 and 26 are preferably identical and may be implemented as passive or active RLC circuits or by techniques based on physical propagation time (e.g., transmission lines or surface acoustic wave devices). Active delay elements utilizing operational amplifiers are preferred because they are relatively cheap, are less sensitive to noise than inductors used in passive delay filters, and are suitable for the bandwidth of interest. The construction of active and passive electrical delay elements may be performed by one skilled in the art (see, e.g., Arthur Williams, "Filter Design Handbook" (1981)). As an example, the delay elements 24 and 26 may be implemented as two-pole all-pass filters of the 0.05 degree equi-ripple error family. In one embodiment, the operational amplifiers X16, X17, X18 and X19 are model type TLC274 as manufactured by Texas Instruments. As delay elements 24 and 26 are of identical design, they may be advantageously located on a single integrated chip so that operating conditions such as temperature will affect the delay time of both delay elements 24 and 26 equally.

It should be noted that the length of the delay periods of delay elements 24 and 26 need not be identical, and choosing different delay periods may reduce system overshoot. Overshoot may occur where delay elements 24 and 26 are implemented as active filters. When an active filter receives an impulse, ringing is experienced. Two consecutive active filters with identical characteristics may multiply the ringing, hence multiplying the overshoot. Selecting different delay periods may control overshoot by preventing unwanted ringing at the same frequencies to be combined. However, the delay periods are preferably selected as identical because of circuit economy considerations. FIG. 3g is a system diagram of an embodiment of the present invention showing the connections of the more detailed circuits depicted in FIGS. 3a-3f.

In operation, the delayed signals on lines 25 and 27 are used to obtain an approximation of a first and second derivative of the input signal Vin as further described below. As described earlier with reference to FIG. 2a, the signals entering the circuit, exiting the first delay element 24 and exiting the second delay element 26 are labeled A, B and C respectively and correspond in FIGS. 3a-3f to the filtered input signal on line 23, first delayed signal on line 25, and second delayed signal on line 27 respectively. The points labeled A, B and C also correspond to the points similarly labeled on FIG. 2a. A summing block 29 performs the operation A-C to obtain an approximation of a first derivative signal V1 of the input signal Vin. This operation is referred to herein as delay line differentiation. A second summing block 28 performs the inverse operation C-A to obtain a negative representation of the first derivative signal V1.

A third summing block extends similar principles to obtain an approximate second derivative signal V2. The numerical approximation of the first derivative is the difference between two adjacent samples or A-B. Another first derivative is calculated by B-C. The second derivative is calculated from the difference between the two first derivatives, or:

    (A-B)-(B-C)=A+C-2B

Summing block 30 performs the above arithmetic operation. This operation is referred to herein as delay line double differentiation. Because the first and second derivatives are calculated across two delay periods, summing blocks 28 and 30 adjust the signal by a factor of two.

Obtaining the first and second derivative signals V1 and V2 in the above manner has several advantages over the conventional method. In conventional systems using analog differentiators, higher frequency response times differ from those at low frequency, making prediction of propagation times difficult. Because edge detection depends on the relative timing of zero crossings of the second derivative signal, nonuniform propagation delays over different frequencies may result in inaccuracies in determining zero crossings. Furthermore, conventional analog differentiation circuits exhibit little or no attenuation outside the bandwidth of interest.

A device according to the preferred embodiment overcomes the above disadvantages by utilizing the advantageous filtering properties of delay line differentiation. FIG. 4a is is a graph showing the periodic type frequency response 50 of a delay line differentiator corresponding to the first summing block 28 operating upon the filtered signal on line 23 and the second delayed signal on line 27. FIG. 5a is a graph showing the periodic type frequency response 55 of a delay line double differentiator corresponding to the second summing block 30 operating upon the filtered signal on line 23 and delayed signals 25 and 27.

As shown in FIG. 4a, the frequency response 50 resulting from delay line differentiation is a periodic type response (often called a "comb" filter). The first null 52 of frequency response 50 is given by the formula f(min)=1/D, where D is the sum of the delay times of the two delay elements 24 and 26 and f(min) is in Hertz. If the sum of the delay times is chosen so that the frequency response 50 has begun to decrease immediately beyond the frequencies of interest, the system has the advantageous property of reducing the amplitude of high frequency noise components while performing the differentiating function. In addition, such filtering is done with completely linear phase. In the present embodiment, the sum of the delay times for delay elements 24 and 26 is 5.5 microseconds, placing the first null 52 at approximately 182 kHz. In comparison, the frequency response 51 of a conventional analog differentiator (not shown) has no similar attenuation at higher frequencies. The difference in high frequency attenuation is shown on a linear scale in FIG. 4b which emphasizes the advantageous frequency response characteristics of the preferred embodiment.

Similarly, as shown in FIG. 5a, the frequency response 55 resulting from delay line double differentiation is also of a comb filter variety and has the advantageous property of reducing the amplitude of high frequency noise components. This filtering is also done with linear phase. If the delay times for each of the delay elements 24 and 26 are 2.75 microseconds each, the first null 57 of the frequency response 55 will be placed at approximately 364 kHz, and the beginning of the roll off region at about 120 kHz, just past the band of interest. In comparison, the frequency response 56 of a conventional analog double differentiator has no similar attenuation at higher frequencies. The same plot in linear scale is shown in FIG. 5b, showing the advantageous frequency response characteristics of the preferred embodiment.

The roll off filtering properties of delay line differentiators are therefore advantageously used to suppress higher frequencies. Although many other types of filters exhibit a roll-off characteristic, virtually none which are used conventionally for the differentiation functions described herein do so with linear phase. Linear phase, as mentioned, provides the advantage of constant group delay and, consequently, minimal distortion due to the differentiation operation. In practice the group delay response of delay line differentiators tends to roll off at higher frequencies, as explained with reference to FIGS. 6a and 6b. The group delay D1 (in FIG. 6a) resulting from delay line differentiation and the group delay D3 (in FIG. 6b) resulting from delay line double differentiation are relatively constant but exhibit a slight roll off in delay response at approximately 80-85 kHz. In contrast, the group delay D2 (in FIG. 6a) of a conventional analog differentiator and the group delay D4 (in FIG. 6b) of a conventional analog double differentiator vary widely over the frequency band of interest. Preferably, a delay period is selected for delay elements 24 and 26 so that the amount of roll off is insignificant in the bandwidth of interest and will not reduce accuracy of detecting transitions (see, e.g., "Filter Design Handbook" cited above).

Referring again to FIGS. 4a and 5a, it can be seen that side lobes 53 and 58 are present in the respective frequency responses 50 and 55. The side lobes 53 and 58 are regions in which less attenuation of high frequency noise occurs. In order to reduce the size of the side lobes 53 and 58 and further increase noise attenuation at high frequencies, the four-pole transitional Gaussian 12-dB filter 22 is placed as a prefilter between the input signal Vin on line 21 and the first delay element 24 and works in combination with the comb filtering is effects described above in order to achieve desirable overall system frequency response. Referring to FIG. 7, the frequency response 60 of the four-pole transitional Gaussian 12-dB filter 22 is shown. The frequency response 60 exhibits flat group delay throughout the unitary gain portion 61 and relatively flat group delay in the roll off region 62. Beyond that point, once the frequency response 60 drops off sharply, group delay is not constant. However, constant group delay is not important at those frequencies because they are beyond the operating range. Thus, the sharp drop-off 63 of the frequency response 60 effectively suppresses the side lobes 53 and 58 as shown on FIGS. 4a and 5a without degrading system performance or affecting group delay within the range of desired operating frequencies.

The effect of the addition of the four-pole transitional Gaussian 12-dB filter 22 is further explained with reference to FIGS. 8a and 8b. As shown in FIG. 8a, the frequency response 70 is the combination of frequency response 60 of the four-pole transitional Gaussian 12-dB filter 22 and the frequency response 50 as shown on FIG. 4a. Notably, the side lobes 53 are substantially suppressed and are reduced to much smaller side lobes 73. In comparison, it can be seen that the frequency response 71 resulting from the combination of the same four-pole transitional Gaussian 12-dB filter 22 and the frequency response 51 as shown in FIG. 4a with respect to an analog differentiator has significantly less attenuation at higher frequencies.

Similarly, the graph of FIG. 8b illustrates the benefit to delay line double differentiation resulting from the addition of the four-pole transitional Gaussian 12-dB filter 22 to the signal processing chain. By virtue of adding the filter 22, the side lobe 58 of the frequency response 55 shown in FIG. 5a is substantially reduced to a much smaller side lobe 78. Furthermore, the frequency response 75 is much steeper than the frequency response 55 prior to addition of the filter 22. In comparison, the frequency response 76 of an analog double differentiator in combination with the same four-pole transitional Gaussian 12-dB filter 22 has significantly less attenuation at higher frequencies.

Variations of the four-pole transitional Gaussian 12-dB filter 22 may be used while still obtaining acceptable performance. For example, a different number of poles may be used for the filter 22. A decrease in the number of poles may lead in some applications to a decrease in performance (e.g., due to insufficient suppression of high frequency noise). An increase in the number of poles may improve performance but may also be more complicated or expensive to implement at the risk of increased ringing. Thus, four poles is preferred. Similarly, the filter 22 may have other than a transitional Gaussian 12-dB characteristic; for example, the filter 22 may be of an equi-ripple variety. A Gaussian type of filter is preferred over other filters because of its favorable drop-off characteristics (combined with its nearly linear group delay in the passband). Other filters, such as a Chebychev filter or Bessel filter, may be underdamped or overdamped for this particular application, and therefore provide a filtered signal having too much overshoot or too much dampening.

It will now be explained in more detail the operation of the circuits that calculate the approximate derivative signals. Operational amplifiers X11, X12 and X14 are used to perform the adding and subtracting functions mentioned earlier. More specifically, the second delayed signal on line 27 and filtered input signal on line 23 are provided as inputs to an operational amplifier X11 which performs the function of subtracting filtered input signal on line 23 from second delayed signal on line 273 in order to provide an approximate negative first derivative signal on line 32. In other words, the operational amplifier X11 performs the operation C-A mentioned above. Likewise, the second delayed signal on line 27 is subtracted from the filtered input signal on line 23 by a summing amplifier X12 in order to obtain an approximate positive first derivative signal on line 31. In other words, the summing amplifier X12 performs the operation A-C. The capacitors C43 and C45 and resistors R43 and R50 connected to the inputs of summing amplifiers X11 and X12 perform additional single-pole low pass filtering to further reduce noise leakage into the following processing stages by suppressing the side lobes 53 shown on FIG. 4a. Such filtering is not done with constant group delay past the critical band of interest. The reason two summing blocks 28 and 29 are used to derive independently the negative and positive derivative signals on lines 31 and 32 is to maintain proper alignment of both the negative and positive derivative signals on line 31 and 32 with the second derivative signal V2.

An approximation of the second derivative of the input signal Vin is obtained in a similar fashion by another operational amplifier X14. The operational amplifier X14 adds the filtered input signal on line 23 to the second delayed signal on line 27 and subtracts twice the first delayed signal on line 25 to arrive at the approximate second derivative signal V2. In other words, operation amplifier X14 performs the A+C-2B function mentioned earlier. A capacitor C48 and a resistor R32 act as a single-pole low pass filter connected to the input of operational amplifier X14 in order to provide additional suppression of the side lobe 58 shown on FIG. 5.

In one embodiment, the operational amplifiers X11, X12 and X14 are model type TLC272 manufactured by Texas Instruments.

After the generation of the approximate first and second derivative signals V1 and V2, the system detects zero crossings of the second derivative signal V2 in order to determine accurately the transitions of the input signal Vin. Zero crossings may be determined in a manner similar to that described, for example, in U.S. Pat. No. 4,000,397. As shown in FIG. 2a, a peak detector 7 receives the first derivative signal V1 and detects its peak value Vp as shown on FIG. 2b. The peak value Vp is sent to a zero crossing detector 9 that uses a percentage of the peak value Vp to establish a threshold VT1. The zero crossing detector 9 sends zero crossing information to a decoder section 8 for decoding of the bar code label.

More specifically, as shown in FIG. 3g, the zero crossings of the second derivative signal V2 may be detected by comparator 44 during intervals when the negative or positive first derivative signal 31 or 32 exceed the respective thresholds VT1 and VT2 as determined by gating logic 48. As this method is more fully described in the '397 patent, only certain aspects of this embodiment will be noted. The thresholds VT1 and VT2 may be derived from the negative or positive first derivative signal on lines 31 or 32, or both, or the second derivative signal on line 33. Preferably the threshold signals VT1 and VT2 are set independently of one another as shown in FIG. 3g. It is desirable to set the threshold signals VT1 and VT2 above the noise floor yet low enough to detect smaller amplitude humps. The threshold signals VT1 and VT2 may therefore be set to a percentage, such as 30%, of the peak voltage Vp of the first derivative signal V1. The derivation of the negative threshold signal VT2 will be described in detail, with the derivation of the positive threshold signal VT1 being accomplished in a like manner. The threshold signal VT2 is maintained above the noise floor by a DC offset of 100 mV provided by the voltage reference Vref through a resistor R89. The peak value Vp of the negative first derivative signal on line 31 is obtained by charging a capacitor C8 when the signal on line 31 is rising and allowing the charge on the capacitor C8 to decay slowly thereafter through resistor R25. More specifically, the negative first derivative signal on line 31 is connected to a capacitor C18 which connects to the base of a transistor Q2. Transistor Q2 is biased around an operating point of approximately 0.6 volts. The collector of transistor Q2 is connected to system voltage Vcc. The emitter of transistor Q2 is connected to the charging capacitor C8 and a decay resistor R25. The emitter of Q2 is also connected to an operational amplifier X13 through resistor R52. The operational amplifier X13 adds the 100 mV offset to 0.3 times the peak voltage Vp (0.3×Vp) to produce the threshold signal VT2. The operational amplifier X13 may be a model type TLC272 as manufactured by Texas Instruments.

It should be noted that while there are several ways in which to take the first derivative signal, the preferred embodiment has the important benefit of maintaining proper alignment of the first and second derivative signals V1 and V2 by generating the second derivative V2 at twice the frequency of the first derivative signal V1, as explained further below. Use of two delay elements allows the first derivative to be taken in any of three ways--that is, by calculating either (i) A-C, (ii) B-C, or (iii) A-B. Method (i), utilizing two delay elements and hence two delay periods to calculate the first derivative, yields a poorer approximation of the first derivative than methods (ii) and (iii), in which only a single delay period is utilized. It would thus appear to be most desirable to select method (ii) or (iii) to obtain the highest accuracy of the first derivative signal V1. However, method (i) may be preferable because it results in proper alignment of the first and second derivatives, as shown in FIG. 2b. In FIG. 2b, the peak voltage Vp of the first derivative signal V1 is directly above the zero crossing ZC of the second derivative signal V2. In contrast, as shown in FIG. 2c, the peak voltage Vprc of the first derivative signal Virc derived from a conventional analog differentiator may be misaligned with the second derivative signal V2rc, causing missed zero crossings or detection of false zero crossings. The poorer approximation of the first derivative in the preferred embodiment is acceptable because the precise value of the first derivative is not necessarily important, as the first derivative signal V1 is used primarily for determining an enabling period during which zero crossings may be detected.

The system described herein also advantageously reduces sensitivity to clipping of the first derivative signal. Clipping may occur where the first derivative signal V1 is limited by the supply rails. Examples of clipping are shown with respect to FIGS. 2d-2e. As shown, clipped first derivative signal Vc1 exhibits relatively flat peaks Vp1 that cause distortion of the second derivative signal Vc2. Thus, zero crossings of the second derivative signal Vc2 may be distorted leading to inaccurate decoding. Generally, clipping increases with the length of the delay period selected. However, clipping may also occur in conventional systems and is more deleterious in such systems because such methods use the first derivative signal Vc1 to derive the second derivative signal Vc2, as shown in FIG. 2e. Thus, in those systems, clipping of the first derivative signal affects the precision of the second derivative signal. However, the described embodiment derives the second derivative signal independently of the first derivative signal; thus, clipping of the first derivative signal will not impact the precision of the second derivative signal, as shown in FIG. 2d (some clipping of the second derivative may result from other effects such as the amplitude of the input signal Vin). This is a major advantage particularly in handheld scanners where, because of the increasing demand for smaller supply voltages and greater depth of field, clipping may likely occur due to larger ranges of input amplitudes.

A further benefit resulting from use of fixed delay intervals of delay line circuits is that the value of the second derivative V2 occurs at a predictable time after the signal enters the delay elements 24 and 26. Threshold decision limits may therefore be established based on the value of the filtered input signal on line 23 in advance of the edge detection operation. Advance threshold setting results in more reliable edge detection during transient conditions, such as when a scanning beam moves from a dark colored area of a package into the light colored background area of a bar code symbol.

In an embodiment where threshold signal VT1 is variable, there may be provided an additional advantage in the reading of the initial portion of a bar code. Because the first transition of the input signal Vin will ordinarily be a white-to-black (i.e, space-to-bar) transition, the system may set up the threshold signal VT1 with reference to the filtered input signal on line 23 because the delay period is predictable from the filtered input signal on line 23 to the derivative. This method results in more reliable edge detection during transient conditions, such as when a scanning beam moves from a dark colored area of a package into the light colored background area of a bar code symbol.

A device according to the preferred embodiment of the invention may therefore exhibit one or more of the following advantages:

attenuation of high frequency noise in a bar code scanning system without the need for a relatively complex low pass filter in the signal processing chain;

the benefit of the second derivative detection processing with minimal distortion due to varying group delay;

accurate reading of bar code labels by detecting zero crossings of the second derivative of the input signal while maintaining constant group delay and attenuating high frequency noise;

proper alignment of the first and second derivatives of an input signal so that the first derivative signal may be used to determine more accurately the zero crossings of the second derivative signal; and

suitable dynamic range of operation without enlargement of the power supply voltage requirements while minimizing the effects of clipping of signal amplitudes.

FIG. 14 is a block diagram of an embodiment in which a more precise approximation of a second derivative of the input signal is derived from samples of the input signal. Although a first embodiment has been described (in FIG. 3) having two delay elements, it is possible to obtain more precise estimates of the first and second derivatives by using more delay elements 303 (although possibly with shorter delay times) and a higher order interpolation scheme. Examples of suitable numerical estimation methods are given in R. W. Hamming, "Numerical Methods for Scientists and Engineers" (2d ed. 1973). These methods are based on approximating the signal with some polynomial over some limited range and using the derivative of this polynomial as the estimate of the true derivative within the limited range.

In another alternative embodiment, edge detection is derived from the second derivative signal without need of the first derivative signal information on lines 31 and 32. Rather, delay lines are once again employed, this time to determine the location of zero crossings of the approximate second derivative signal V2 and detect valid transitions of small amplitude. This method is explained with reference to FIGS. 9a-9c. Essentially, this method is based on the assumed presence of symmetrical signal peaks 150 and 151 on either side of a valid zero crossing 155 of the second derivative signal 152 (corresponding to V2 of FIG. 2b), as shown in FIG. 9b. Two delay elements 120 and 121 are used to "sample" the second derivative signal 152 at two intervals of time. Thus, a first delayed second derivative signal is generated on line 131 and a second delayed second derivative signal is generated on line 132. These two signals 131 and 132 are identical to the second derivative signal 152 except for the fact that they are time-shifted. The circuit looks for zero crossings of the first delayed second derivative signal on line 131. A zero crossing 155 is detected only when both the second derivative signal 152 and the second delayed second derivative signal 132 are outside the deadband region defined by positive threshold 153 and negative threshold 154, indicating signal peaks 150 and 151 exist to either side of zero crossing 155.

This particular technique using delay elements 120 and 121 to detect zero crossings of the second derivative signal 152 does not require use of first derivative signal information. However, it generally does require knowledge of how far apart to expect the signal peaks 150 and 151, 100-400 nanoseconds being typical for fixed scanners and 2-3 microseconds for handheld scanners. The delay period of delay elements 120 and 121 may thus be chosen based on system parameters. The absolute value of the delay periods are not critical, as the system need not detect zero crossings at the exact top of the signal peaks but at any point while peaks 150 and 151 are outside the deadband region. The system of FIG. 9a will therefore assume a valid zero crossing 155 whenever a first portion of the second derivative signal 152 exceeds one of the two thresholds 153 and 154 a predefined time before the zero crossing 155 and a second portion of the second derivative signal 152 exceeds the other of the two thresholds 153 and 154 a predefined time after the zero crossing 155, regardless of whether the first and second signal portions of the second derivative signal 152 correspond to actual identifiable peaks 150 and 151 in the second derivative signal 152.

Because this method functions best when there is symmetric time domain response, it is ideally suited for use in a system in which the second derivative signal 152 has constant group delay or linear phase response. This method also functions best with clean derivative signals and is thus ideally suited for use in a system in which the second derivative signal 152 is derived from delay lines.

It should be noted that the positive and negative thresholds 153 and 154 are not the same as the threshold signals VT1 and VT2 described in conjunction with the first derivative signal. Thresholds 153 and 154 may be of relatively low amplitude and function to prevent the system from providing erroneous output when there is no input signal. The reason that thresholds 153 and 154 may be relatively low is because of the advantageous noise rejection features of the described embodiment. The system will not respond to a single noise glitch. but only to a noise pattern that satisfies the same conditions as required to produce a valid output. In other words, in order for the system to produce an invalid output due to noise, there must be a positive noise glitch exceeding threshold 153 followed by a zero crossing followed by a negative noise glitch below threshold 154 (or vice versa) within the time fixed by the delay periods. Because such noise patterns are less frequent than single voltage spikes that would cause invalid outputs in other systems, the described embodiment is less sensitive to noise and may therefore utilize lower thresholds. The use of lower threshold enables more capability of detecting zero crossings where the second derivative signal 152 is of low amplitude. In addition, this embodiment may advantageously fix thresholds 153 and 154 in order to minimize sensitivity to clipping of the derivative signals.

An embodiment performing the above function is shown in FIG. 9a. The second derivative signal 152 is sent on line 130 to a first delay element 120 to generate a first delayed second derivative signal on line 131. The output of delay element 120 is sent to a second delay element 121 in order to generate a second delayed second derivative signal on line 132. The second derivative signal 152 on line 130 is compared with the positive threshold 153 on line 124 by a comparator 122. A logical HIGH is generated by the comparator 122 when the second derivative signal on line 130 exceeds the positive threshold 153. Similarly, when the second derivative signal 152 on line 130 is below the negative threshold 154 on line 125, a comparator 123 generates a logical HIGH signal on line 134. Likewise, when the first delayed second derivative signal on line 131 exceeds zero, a comparator 126 generates a logical HIGH, and when the signal on line 131 is below zero, a comparator 127 generates a logical HIGH. In the same manner, when the second delayed second derivative signal on line 132 exceeds the positive threshold 153 on line 144, a comparator 138 generates a logical HIGH on line 140, and when the signal on line 132 is below the negative threshold 154 on line 143, a comparator 137 generates a logical HIGH on line 139. A logical AND gate 135 generates a HIGH signal on line 141 when the second derivative signal on line 130 exceeds the positive threshold 154, the second delayed second derivative signal on line 132 is below the negative threshold 137, and the lo first delayed second derivative signal on line 131 exceeds zero. The AND gate 135 will switch states when the first delayed second derivative signal on line 131 passes through zero. Similarly, a logical AND gate 136 generates a HIGH signal on line 142 when the peaks 150 and 151 exceed opposite thresholds 153 and 154 at sample times 156 and 157.

A rising edge from LOW to HIGH on output of AND gate 135 generally indicates the beginning of a bar, and a rising edge on the output of AND gate 136 generally indicates the end of a bar. Comparators 122 and 123 are configured in the opposite manner from comparators 135 and 136, so that the system looks for peaks of opposite polarity to either side of the zero crossing 155 no matter whether the first peak is positive or negative. The information on lines 141 and 142 is sent to decoding logic (not shown) in order to decode the bar code label. The decoding logic may employ a timer (not shown) to calculate the time difference between output signals of gates 135 and 136 so as to permit calculation of the widths of bars and spaces.

Waveform examples of the above embodiment in operation are shown in FIG. 10 corresponding to signals at selected points labelled on FIG. 9a. As shown in FIG. 10, signals N, M, and L are identical except for their positions in time and correspond to the second derivative signal 152 on line 130, the first delayed second derivative signal on line 131, and second delayed second derivative signal on line 132, respectively. As can be seen, the system effectively detects a zero crossing 155 at a time when the first peak 151 has been shifted back in relative time and the second peak 150 of opposite polarity has been shifted forward in relative time, thereby properly aligning the two peaks 150 and 151 with the zero crossing 155. Waveform E shows the output of comparator 123 as HIGH when the second derivative signal 152 is below the negative threshold 154. Waveform I shows the output of comparator 144 as HIGH when the second delayed second derivative signal on line 132 is above the positive threshold 153. Waveform G shows the output of comparator 127 as HIGH when the first delayed second derivative signal is below zero (the shaded portion indicating that the value is indeterminate). Waveform K shows that the output of AND gate 136 goes HIGH at the time of the zero crossing 155.

FIG. 12 is a diagram incorporating the zero crossing method explained in FIGS. 9a-9c. The system of FIG. 12 is similar to that of FIG. 2a but, as noted previously, functions without generating an approximation of the first derivative.

One problem that may be experienced with the method described in the preceding few paragraphs is that when edges get close together, such as, for example, when two bars are separated by only a single space, the exact point of the zero crossing 155 may be difficult precisely to determine due to intersymbol interference. This problem is explained with reference to FIG. 9c. A second derivative waveform 165 is shown distorted by intersymbol interference. The positive and negative signal peaks 160 and 161 of the second derivative waveform 165 may become asymmetrical causing the true zero-crossing 163 to shift to a later false zero crossing 164.

FIGS. 16a-16c are waveform diagrams showing in more detail how intersymbol interference may shift a true zero crossing point to a "false" zero crossing point. FIG. 16a shows a first portion 501 of the second derivative signal corresponding to a black-to-white edge transition (of, e.g., a scanned bar code), and a second portion 502 of the second derivative signal corresponding to a white-to-black transition, with no interference between the first and second signal portions 501, 502. As the edges get closer together, the first signal portion 501 and second signal portion 502 begin to overlap. FIGS. 16b and 16c the resulting signal 512; for the purpose of clarity, only the resulting signal for the first edge is shown. FIG. 16b also illustrates the relative proximity of the first and second signal portions 501 and 502 leading to the creation of the resulting signal 512, and further shows the "true" zero crossing point 513 (i.e., in the absence of intersymbol interference) as compared to a "false" zero crossing point 514 caused by the interference between the first signal portion 501 and the second signal portion 502.

At the same time that the true zero crossing point 513 is shifted, the waveform is distorted so that the signal peaks 561 and 562 (or 160 and 161 of FIG. 9c) are no longer symmetrical. As illustrated in FIG. 16c, one peak 561 is generally narrower and shorter than the other peak 562. This asymmetry can be measured and used to estimate the error introduced in the location of the zero crossing. From the reference of the detected zero crossing 514, the true zero crossing will typically lie further in the direction of the wider, taller peak 562 and away from the narrower, shorter peak 562.

In one technique, the amount of shift from the detected zero crossing point to the true zero crossing point may be estimated by calculating the slope 162 of the second derivative waveform 165 (as shown in FIG. 9c) at the false zero crossing 164 (using the delayed signals on lines 130 and 132 as points on the line) and the relative amplitude of the signal peaks 160 and 161. FIG. 17 is a block diagram of a circuit for performing this function. In FIG. 17, a second derivative signal 630 is provided to a series of delay elements 620, 621 in a manner similar to that shown in FIG. 9a. The second derivative signal 630, a first delayed representation 631 thereof, and a second delayed representation 632 thereof are provided to a zero crossing detector 650, which basically represents the circuitry depicted in FIG. 9a for determining the presence of a valid zero crossing of the second derivative signal. The remaining circuit elements in FIG. 17 are for the purpose of determining the amount of shift in the measured zero crossing as described below.

Detection of a valid zero crossing by the zero crossing detector 650 activates signal 651 in FIG. 17. Signal 651 triggers sample-and-hold circuits 670 and 671. The first sample-and-hold circuit 670 samples the second derivative signal 630 to obtain a measurement of the first peak value. The second sample-and-hold circuit 671 samples the second delayed representation 632 to obtain a measurement of the second peak value. These measurements correspond to peaks 150 and 151 taken at sample times 156 and 157, respectively, as appearing in FIG. 9b. While FIG. 9b shows the sample times 156 and 157 occurring at the top of the signal peaks 150, 151 of the second derivative signal 152, the actual sampled portions of the second derivative signal 152 may be any part of the signal that exceeds the threshold 153 or 154. The actual sampled portion depends on the width of the signal "humps" and the time of sampling (i.e., the time delay of delay elements 620, 621). Because the FIG. 17 embodiment will not necessarily sample at the precise signal peaks, the calculation of zero crossing shift, explained below, is generally considered a rough approximation.

Sample-and-hold circuits 670 and 671 output sampled signals 672 and 673, respectively. The sampled signals 672, 673 are connected to a difference circuit 675. The difference circuit 675 calculates a degree of asymmetry (also called the symmetry error or symmetry deviance) in the second derivative signal in one of at least two ways. Assuming that the measured amplitude value for the first sampled signal 672 is A_(N) and for the second sampled signal 673 is A_(P), then the difference circuit 675 in one embodiment calculates the degree of asymmetry by the following formula: (A_(N) -A_(P))/(A_(N) +A_(P)). In another embodiment, the difference circuit 675 calculates the degree of asymmetry by the formula A_(N) /A_(P). In each case, the relative amplitudes of the sampled signals 672, 673 are assumed to be proportional to the degree of asymmetry and, hence, the degree of zero crossing shift. While the two formulas are not mathematically identical, each represents a function which varies monotonically with the degree of asymmetry.

The formula A_(N) /A_(P) corresponds to a measurement of the slope of the second derivative signal 630. This slope is essentially the third derivative of the input signal Vin. The amount by which the third derivative deviates from the slope of the second derivative signal without interference indicates the amount of asymmetry in the second derivative waveform and, hence, the amount of shift in the measured zero crossing. The slope of the second derivative signal without interference is a function of the hardware and may be determined by experiment for particular circuit values.

FIG. 20 is a graph showing the second derivative signal 512, and a line 531 representing the slope of the second derivative signal 512 at the measured zero crossing point 514. Because points on line 531 are not readily available, the points A_(N) and A_(P) are used instead as a secondary indication of the slope of line 530. The ratio of A_(N) to A_(P) is assumed to be indicative of the degree to which the slope of line 531 deviates from the slope of a symmetric second derivative waveform passing through the zero point. The ratio of A_(N) to A_(P) is physically represented in FIG. 20 by the slope of dotted line 530.

Other configurations whereby the signal peak amplitudes are obtained will also work. Such configurations need only use one of the representations of the second derivative signal if a memory element is employed to retain the first measured amplitude value. By sampling points A_(N) and A_(P), however, the FIG. 17 circuit takes advantage of the fact that the signal peaks (or threshold-exceeding portions of the signal) are available simultaneously by virtue of using the two delay lines 620 and 621, thereby providing "past" and "future" data surrounding the measured zero crossing point.

The difference signal 680 output from difference circuit 675 comprises an estimate of the zero crossing shift based on the relative amplitudes of the measured signal portions.

The difference signal 680, which is preferably digital in format, is provided as an address to a lookup table 681 (e.g., a ROM). For each potential discrete value of the difference signal 680, a corresponding correction factor is stored in the lookup table 681. The lookup table 681 outputs a signal 682 comprising a correction factor to the measured zero crossing.

The correction factor output from the lookup table 681 may be a digital signal of counts to be added or subtracted from the measured zero crossing time, particularly where a digital counter is being used to measure the distance in counts between zero crossings (as mentioned previously). The contents of the lookup table 681 may be determined experimentally to compensate for any system distortions, and may be positive, negative, or zero in value. Preferably, the asymmetry computation function varies monotonically with the degree of asymmetry; thus, a unique value should be provided for each degree of asymmetry.

FIG. 23 is a diagram illustrating application of a correction factor based on the output of the lookup table 681. In FIG. 23, a time graph is shown having points t₁, t₂ and t₄ at which valid zero crossings were detected. The first point t₁ is assumed to be correct. The value T_(m) represents the measured time (equivalent to measuring distance) between zero crossings. detected at points t₁ and t₂. The value T_(c) represents a correction factor (positive in this case) obtained from lookup table 681. The "true" zero crossing is thus taken to be point t₃ rather than point t₂, and the time (or distance) between the two zero crossings is taken to be t₃ -t₁ rather than t₂ -t₁. The correction factor may be either positive or negative, depending upon the calculated slope of the second derivative signal at the zero crossing and the type of transition (e.g., black-to-white or white-to-black).

Each valid zero crossing may have a correction factor applied in a similar manner. When corrected, the new zero crossing location is used as the reference for the following zero crossing measurement when determining distance between zero crossings (for purposes of, e.g., decoding).

Detection of a valid zero crossing in the FIG. 17 embodiment also causes signal 651 to trigger a one-shot 660. The one-shot 660 switches states for an amount of time sufficient to allow sampling of signals 630 and 632, calculation by the difference circuit 675, and retrieval of an appropriate correction factor from lookup table 681 based on difference signal 680. When the one-shot 660 times out, it switches back to its stable state and sends a reset signal 661 to the sample-and-hold circuits 670, 671. Sample-and-hold circuits 670, 671 are thereby cleared to measure the next signal peak values.

As an alternative to using a lookup table 681, the correction factor may be determined by mathematical formula. However, application of a mathematical formula would require precise knowledge of the system characteristics, including any is non-linearities. Thus, a lookup table will ordinarily be preferred. The mathematical formula may be calculated using an analog arithmetic circuit, or digitally using a microprocessor, arithmetic logic unit (ALU), or similar device.

A second embodiment of a circuit for measuring a degree of zero crossing shift is shown in FIG. 18. In FIG. 18, a second derivative signal 730 is provided to a series of delay elements 720, 721 in a manner similar to that shown in FIG. 9a. The second derivative signal 730, a first delayed representation 731 thereof, and a second delayed representation 732 thereof are provided to a zero crossing detector 750, which basically represents the circuitry depicted in FIG. 9a for determining the presence of a valid zero crossing of the second derivative signal. The remaining circuit elements in FIG. 18 are for the purpose of determining the amount of shift in the measured zero crossing as described below.

The first delayed representation 731 is provided to a derivative circuit 760, which takes a first derivative of its input. The derivative circuit 760 may be either an analog RC differentiator circuit, or a time-sampled differentiator circuit operating according the principles of approximation (using F(t)-F(t-D)) described earlier herein. A derivative signal 760 (which is the third derivative of the original input signal V_(in)) is connected to a sample-and-hold circuit 769. The sample-and-hold circuit 769 is triggered when a valid zero crossing is detected by the zero crossing detector 750. The sample-and-hold circuit 769 thereby outputs a derivative value of the first delayed representation 731 when that signal crosses the zero level.

The output 770 of the sample-and-hold circuit 769 may be digitized (e.g., by a low resolution A/D converter, not shown) and provided to a lookup table 781. The lookup table 781 outputs a signal 782 comprising a correction factor in a manner as described with respect to the FIG. 17 embodiment. The contents of the lookup table 781 may be determined by experiment, similar to the FIG. 17 embodiment. The output of the derivative circuit 760, which represents the slope of the first delayed representation 731 at its zero crossing, is assumed to be indicative of a degree of shift from the "true" zero crossing, and is therefore used in the FIG. 18 embodiment for arriving at an appropriate correction factor.

FIG. 22 is a block diagram of a third circuit for determining the amount of shift of the measured zero crossing point from the "true" zero crossing point. The FIG. 22 embodiment generally operates by determining the locations of the signal peaks in the second derivative signal, and calculating the degree of asymmetry according to a formula employing a ratio of the measured signal peaks. The FIG. 22 embodiment outputs a correction factor, which may be delayed in time from detection of the measured zero crossing point (until the trailing signal peak is located).

In FIG. 22, the circuitry of FIG. 9a is used to detect a valid zero crossing of the second derivative signal. The second derivative signal is also connected to line 831 in FIG. 22. (While any of the second derivative signal or its delayed representations may be used in FIG. 22, using the actual second derivative signal is preferred for the quickest determination of the correction factor). Line 831 is connected to a delay element 832 and a pair of comparators 840, 841. The output 833 of the delay element 832 is connected to the first comparator 840 and an inverter 834. The output 835 of the inverter 834 is connected to the second comparator 841. Comparators 840 and 841 each compare their respective inputs and generate output comparison signals 842 and 843, respectively. The output comparison signals 842, 843 are provided to a microprocessor 855 (or other suitable calculating circuit) for determination of the correction factor.

In operation, the delay element 832 provides a short delay of, e.g., about one clock period (i.e., one count period of the counter used to measure the distance between zero crossings). The exact delay period selected for delay element 832 depends on the expected width of the signal pulses of the second derivative signal 831. Comparator 840 compares the second derivative signal 831 with a slightly delayed version thereof output from delay element 832. When the second derivative signal 831 changes direction from positive to negative (or, alternatively, from negative to positive), it will cause the comparator 840 to change states. The change in direction from positive to negative indicates the presence of a positive signal peak in the second derivative signal 831, such as peak 528 shown in FIG. 19.

Likewise, an inverse delayed second derivative signal 835 is compared against the second derivative signal 831 by comparator 841. When the second derivative signal 831 changes direction from negative to positive, it will cause the comparator 841 to change states. The change in direction from negative to positive indicates the presence of a negative signal peak in the second derivative signal 831, such as peak 529 shown in FIG. 19.

Comparators 840, 841 therefore detect the occurrences of the positive and negative signal peaks, respectively, in the second derivative signal 831. Operation of comparators 840, 841 is equivalent in some aspects to looking for a zero crossing of the second derivative signal's derivative. In order to reduce sensitivity to noise, the second derivative signal 831 may be filtered (e.g, by a low pass filter) prior to its application to the circuit of FIG. 22. Alternatively, or in addition, the comparators 840, 841 may be configured with a level of hysteresis, which will also tend to reduce the potential for thrashing, particularly around the transition point.

The comparators 840 and 842 are connected to a logical OR gate 845, such that when either of the comparators 840, 842 changes state the output signal 846 from the OR gate 845 becomes active. Signal 846 output from the OR gate 845 is connected to a capture register 851, which is triggered upon activation of signal 846 to capture a count value from a clock and counter circuit 850. The count value in the capture register 851 is provided to the microprocessor 855. The comparison output signals 842 and 843 are also provided to the microprocessor 855. The microprocessor 855 reads the count value stored in the capture register 851 and determines, from the comparison output signals 842 and 843, which of the comparators 840, 841 changed state (and, hence, whether a positive or negative peak was detected). The microprocessor 855 is also assumed to receive the time of zero crossing detection from the circuitry of FIG. 9a.

From the information provided to the microprocessor 855, a correction factor may be determined as follows. The microprocessor 855 calculates the time difference between the occurrence of each signal peak and the measured zero crossing point, as may be explained with reference to FIG. 19. Thus, the microprocessor 855 calculates the time difference T_(N) (in clock counts) between a preceding signal peak 529 (in this example a negative peak) and the measured zero crossing point 514. The microprocessor 855 also calculates the time difference T_(P) (in clock counts) between a subsequent signal peak 528 (in this example a positive peak) and the measured zero crossing point 514. The relative occurrence in time of the preceding and subsequent signal peaks 529, 528 is assumed to be indicative of the amount of shift from the "true" zero crossing point.

The microprocessor 855 calculates a degree of asymmetry in the second derivative waveform (and hence the degree of shift in the measured zero crossing point) in one of at least two ways. In one embodiment the microprocessor 855 calculates the degree of asymmetry by the following formula: (T_(N) -T_(P))/(T_(N) +T_(P)). In another embodiment, the microprocessor 855 calculates the degree of asymmetry by the formula T_(N) /T_(P). In each case, the relative signal peak locations are assumed to be proportional to the amount of zero crossing shift. While the two formulas are not mathematically identical, each represents a function which varies monotonically with the degree of asymmetry, similar to the FIG. 17 embodiment.

When the signal is symmetric, T_(P) is equal to T_(N) and the symmetry error is zero. Otherwise, application of either of the above two formulas leads to a calculated symmetry error (or symmetry deviance). The calculated symmetry error may be applied to a lookup table (included as part of microprocessor block 855) or used as part of a predefined mathematical formula for is determining a correction factor. The contents of the lookup table, or the mathematical formula to use, may be determined in a manner as explained with respect to the FIG. 17 embodiment.

Instead of using comparators 840 and 841, other conventional means for peak detection (either analog or digital) may be used. Also, instead of using the occurrence in time of the signal peaks 528, 529, the amplitudes of the signal peaks 528, 529 may be used to determine the zero crossing shift. In such a case, when a signal peak 528 or 529 is detected (e.g., in the manner shown in FIG. 22), the amplitude of the second derivative signal may be sampled (e.g., by a sample-and-hold circuit). Signal peak amplitudes A_(N) (for the negative signal peak) and A_(P) (for the positive signal peak) may thereby be determined. The relative signal peak amplitudes A_(N) and A_(P) may be used in the same manner as described with respect to the FIG. 17 or FIG. 22 embodiment for arriving at a symmetry error measurement.

Another way to determine the shift 166 of the zero crossing 163 is by measuring the relative pulse widths 170 and 171 of the signal 165, as shown in FIG. 9c. When the waveform is symmetric, the pulse widths 170 and 171 should be identical. The difference in the pulse widths 170 and 171 indicates the amount of the zero crossing shift 166.

A circuit for measuring the relative pulse widths of the second derivative signal is shown in FIG. 24. In FIG. 24, the circuitry of FIG. 9a is used to detect a valid zero crossing of the second derivative signal. The second derivative signal is also connected to line 931 in FIG. 24. (While any of the second derivative signal or its delayed representations may be used in FIG. 24, using the actual second derivative signal is preferred for the quickest determination of the correction factor). Line 931 is connected to a pair of comparators 940, 941. A positive threshold signal 935 is connected to the first comparator 940, and a negative threshold 936 is connected to the second comparator 941. Comparators 940 and 941 each compare their respective inputs and generate output comparison signals 942 and 943, respectively. The output comparison signals 942, 943 are provided to a microprocessor 955 (or other suitable calculating circuit) for determination of the correction factor.

In operation, the positive threshold signal 935 and negative threshold signal 936 are set symmetrically above and below the zero reference level. FIG. 21 is a waveform diagram showing the presence of a positive threshold level 540 corresponding to the positive threshold signal 935 in FIG. 24, and a negative threshold level 541 equal in magnitude to the positive threshold level 540 and corresponding to the negative threshold signal 936 in FIG. 24. Typically, the positive threshold level 540 and negative threshold level 541 may be set to approximately seven times the rms noise floor of the electronic system; however, a wide range of other threshold levels will also work. The widths of the positive and negative lobes of the second derivative signal 512 are determined by measuring the amount of time the second derivative signal 512 is above or below the respective threshold level 540 or 541. These widths are denoted in FIG. 21 as W_(P) (for the positive lobe width) and W_(N) (for the negative lobe width).

When the second derivative signal 931 exceeds the positive threshold signal 935, the comparator 940 switches states and remains therein until the second derivative signal 931 falls back below the positive threshold signal 935. Output comparison signal 942 is connected to a logical OR gate 945, which triggers a capture register 951 to load a count value from a clock and counter circuit 950 similar to that described for the FIG. 22 embodiment. The microprocessor 955 associates the count value with the proper lobe by monitoring the output comparison signals 942 and 943. The first count value associated with a given lobe is designated as the lobe starting point, and the second Count value associated with the same lobe is designated as the lobe ending point. The difference between the lobe starting point and the lobe ending point is calculated to arrive at the lobe width.

Comparator 941 operates in an analogous manner to comparator 940, except it switches state when the second derivative signal 931 drops below and then rises back above the negative threshold signal 936. Comparator output signal 943 likewise is provided to OR gate 945, which triggers the capture register 951 to load a count value from the clock and counter circuit 950. Because the output comparison signals 942 and 943 are mutually exclusive (that is, there cannot be a positive and negative signal lobe simultaneously), there will be no conflict over the capture register 951 nor ambiguity with determining which of the comparators 940, 941 is responsible for triggering the capture register 951.

From the information provided to the microprocessor 955, a correction factor may be determined as follows. The microprocessor 955 calculates the lobe widths (in clock counts) for both the positive and negative signal peaks W_(P), W_(N) surrounding the zero crossing 514. The microprocessor 955 calculates a degree of asymmetry in the second derivative waveform (and hence the degree of shift in the measured zero crossing point) in one of at least two ways. In one embodiment the microprocessor 955 calculates the degree of asymmetry-by the following formula: (W_(N) -W_(P))/(W_(N) +W_(P)). In another embodiment, the microprocessor 955 calculates the degree of asymmetry according to the formula W_(N) /W_(P). In each case, the relative signal peak widths are assumed to be proportional to the amount of zero crossing shift. While the two formulas are not mathematically identical, each represents a function which varies monotonically with the degree of asymmetry, similar to the FIG. 17 or the FIG. 22 embodiments.

When the signal is symmetric, W_(P) is equal to W_(N) and the symmetry error is zero. Otherwise, application of either of the above two formulas leads to a calculated symmetry error (or symmetry deviance). The calculated symmetry error may be applied to a lookup table (included as part of microprocessor block 955) or used as part of a predefined mathematical formula for determining a correction factor. The contents of the lookup table, or the mathematical formula to use, may be determined in a manner as explained with respect to the FIG. 17 embodiment.

Other similar variations of the described techniques for detecting the zero crossing shift may also be used. Typically, each of these variations will involve measuring one or more of the peak amplitudes, pulse widths, or other signal characteristics indicative of the degree of asymmetry, and applying a correction value based on the degree of asymmetry.

While the embodiments shown so far have been related to a laser scanning bar code reader, it should be appreciated that the same circuit can be utilized in readers that have other types of signal generation methods. In particular, the electrical signal that represents the light reflected from a label could come from a CCD imaging device. The characteristics of such a signal are in pertinent respects identical to those from a laser scanner and therefore this invention can be used advantageously in such devices to effectively process the signal for edge detection. Moreover, a CCD imaging device already has synchronous input and is therefore well suited for use with the present invention. This method can also be done in real time.

Another alternative embodiment may employ sample-and-hold circuits to achieve the same benefits of the delay line signal processing described previously. An example of such an alternative embodiment is described with reference to FIGS. 13a-13f. The embodiment utilizes three sample-and-hold circuits 250-252 to sample at various intervals t0, t1, t2 . . . as shown on FIG. 13f, where the waveform 280 corresponds to the input signal Vin. The first sample-and-hold circuit 250 samples at time interval t0, t3, t6, . . . , the second sample-and-hold circuit 251 at time interval t1, t4, t7, . . . , and the third sample-and-hold circuit 252 at time interval t2, t5, t8, . . . . Thus, at any given time the system has information pertaining to at least three consecutive sample times. The outputs of the sample-and-hold circuits 250-252 are sent to arithmetic block 208 to calculate the first and second derivative signals V1 and V2 according to the formulas "A-C" and "A+C-2B" discussed before. One circuit 253 performs the first derivative calculation and a second circuit 254 performs the second derivative calculation. Because only two calculating circuits 253 and 254 are used, additional logic is necessary to determine which sample-and-hold circuits 250-252 correspond to the A, B, and C signals at any given time and to connect the proper sample-and-hold circuits to the proper inputs of calculating circuits 253 and 254 at the proper time.

With reference to the embodiment shown in FIG. 13a, a controller 239 provides, among other things, selective coupling of sample-and-hold circuits 250-252 clock control 206 provides a synchronous clock signal 262 to a counter 200. With each pulse of clock signal 262 the counter 200 increments, transferring the system to the next state. Each new state corresponds to a new sample period t0, t1, t2 . . . at which time the sample-and-hold circuits 250-252 are enabled as further explained below. The counter 200 is connected to an EPROM 201 which functions as a look-up table containing command data for the given state. The present state of the counter 200 is used as the address of the EPROM 201. The command data of the EPROM 201 for the selected state is latched by latch 202. The output of the latch is sent to control the CCD array 203, the enabling logic 204 for the sample-and-hold circuits 250-252 (shown collectively as the S/H block 205 on FIG. 13a), and relays REL1-REL9 (shown collectively as the relay block 207 on FIG. 13a). The relays REL1-REL9 (shown in FIG. 13d) control the connections to the calculation circuits 253 and 254 of the arithmetic block 208. Although the described embodiment utilizes a counter 200 and EPROM 201 to perform the command logic, it should be noted that a finite state machine could be easily substituted to perform the same function. Further, although the described embodiment utilizes a CCD array input, it should be noted that the sample-and-hold circuits 250-252 could also operate on an analog input signal. Further, because a CCD imaging device has an intrinsic sample-and-hold, a similar system to that described herein may be created with only two sample-and-hold circuits while using the CCD imaging device as a substitute for the third.

The embodiment of FIG. 13a is shown with more detail in FIGS. 13b-13d. Referring to FIG. 13b, a clock signal 260 of roughly 616 kHz is provided to a J-K flip-flop 220 which is in turn connected to another J-K flip-flop 221 for the purpose of producing a clock signal 262 at roughly one quarter the speed, or 154 kHz. The output of the J-K flip-flop 221 sends the clock signal 262 to the counter 200. The output of the counter 200 is connected to the address of a 16 k×8 EPROM 201. The output of EPROM 201 is latched by latch 202. The system clock signal 260 is also inverted by inverter 222 to provide an inverse clock signal for the latch 202. The output of inverter 222 is then connected to two inverts 223 and 224 separated by a capacitor Cck and a resistor Rck which delay the signal approximately 100 ns. The output of inverter 224 is connected to a J-K flip-flop 226 which halves the signal frequency. Thus, the output of the J-K flip-flop 226 is a delayed sample clock signal 263 representing a delayed version of clock signal 260 at half the frequency. As shown in FIG. 13e, the delayed sample clock signal 263 provides a positive pulse during each half period of the clock signal 262 which is used to control the CCD array 203. The use of the delayed clock signal 263 enables the sampling of the CCD array 203 output by the sample-and-hold circuits 250-252 after transitory conditions have settled, thus providing a clean and accurate input signal.

The output of the latch 202 is used to control various circuitry in the rest of the system. A kick signal 210 output from the latch 202 resets the circuitry in a known state at the beginning of a scan line. Three CCD control signals 211-213 are used to control the CCD array. Three logic signals OUT0-OUT2 are used to control the enabling of the sample-and hold circuits 250-252 and the relays REL1-REL9. All three sample-and-hold signals 250-252 are connected together to receive the source signal provided by the CCD array 203. As the three sample-and-hold circuits 250-252 alternate in collecting data, the logic signals OUT0-OUT2 ensure that only one of the three sample-and-hold circuits 250-252 is enabled at a given time.

With reference to FIG. 13c, the logic signals OUT0-OUT2 are individually logically ANDed by logic gates 240-242 with the delayed sample clock signal 263 in order to provide enabling signals 243-245 to sample-and-hold circuits 250-252, respectively. Each of the three sample-and-hold circuits 250-252 are enabled only when its respective signal is high. Referring to FIG. 13e, signals 264-266 show the relative timing patterns of enabling signals 243-245, respectively.

Referring to FIG. 13d, the relays REL1-REL9 are used to control the inputs to the calculation circuits 253 and 254. The relays REL1-REL9 may be implemented as analog switches. The first three relays REL1-REL3 connect the outputs of the sample-and-hold circuits 250-252 to the inputs of the calculation circuits 253 and 254 corresponding to the "A" input described earlier. Likewise, the next three relays REL4-REL6 connect the outputs of the sample-and-hold circuits 250-252 to the inputs of the calculation circuits 253 and 254 corresponding to the "B" input described earlier. In the same manner, the final three relays REL7-REL9 connect the outputs of the sample-and-hold circuits 250-252 to the inputs of the calculation-circuits 253. and 254 corresponding to the "C" input described earlier. Table 13-1 below shows the proper connections for each given timing period.

                  TABLE 13-1     ______________________________________     1st Der.   2nd Deriv.     Calculations     ______________________________________     0   V.sub.2  - V.sub.φ                    V.sub.2  + V.sub.φ  - 2V.sub.1                                   A - C  C + A - 2B     1   V.sub.3  - V.sub.1                    V.sub.3  + V.sub.1  - 2V.sub.2                                   B - A  A + B - 2C     2   V.sub.4  - V.sub.2                    V.sub.4  + V.sub.2  - 2V.sub.3                                   C - B  B + C - 2A     3   V.sub.5  - V.sub.3                    V.sub.5  + V.sub.3  - 2V.sub.4                                   A - C  C + A - 2B     4   V.sub.6  - V.sub.4                    V.sub.6  + V.sub.4  - 2V.sub.5                                   B - A  A + B - 2C     5   V.sub.7  - V.sub.5                    V.sub.7  + V.sub.5  - 2V.sub.6                                   C - B  B + C - 2A     6   V.sub.8  - V.sub.6                    V.sub.8  + V.sub.6  - 2V.sub.7                                   A - C  C + A - 2B     7   V.sub.9  - V.sub.7                    V.sub.9  + V.sub.7  - 2V.sub.8                                   B - A  A + B - 2C     8   V.sub.10  - V.sub.8                    V.sub.10  + V.sub.8  - 2V.sub.9                                   C - B  B + C - 2A     9   V.sub.11  - V.sub.9                    V.sub.11  + V.sub.9  - 2V.sub.10                                   A - C  C + A - 2B     10  V.sub.12  - V.sub.10                    V.sub.12  + V.sub.10  - 2V.sub.11                                   B - A  A + B - 2C         .          .         .          .         .          .     N   V.sub.(N+2)  - V.sub.N                    V.sub.(N+2)  + V.sub.N  - 2V.sub.N+1     ______________________________________

For Table 13-1, V_(N) is the voltage sampled at time period t_(N). Note that the pattern repeats every three sample periods. A first relay enable signal 267 corresponds to OUT0 and activates relays REL3, REL4, and REL8. A second relay enable signal 268 corresponds to OUT1 and activates relays REL1, REL5 and REL9. A third relay enable signal 269 corresponds to OUT2 and activates relays REL2, REL6 and REL7. In operation, the first and second derivative signals V1 and V2 are output from calculation circuits 253 and 254.

In another alternative embodiment, an analog shift register may be used to store input data. During each clock period, charge is transferred from one capacitor to a neighboring capacitor of the analog shift register. In such an embodiment, the system would use the stored signal from three consecutive cells of the analog shift register as inputs to the summing blocks 5 and 6 (in FIG. 2) in order to perform the same calculations as described previously.

In yet another embodiment, as shown, for example, in FIG. 15, the delay elements 403 and 404 may be adjustable and therefore useful for widely varying conditions. The delay period may be dynamically adjusted to enable the reading of labels of various sizes at various distances over a wide depth of field. The delay period may be chosen as one of several discrete periods or may be a continuously variable delay period. Further, the delay period may also be matched to a particular range setting of an adjustable-focus scanner such as described in U.S. Pat. No. 5,347,121 issued on Sep. 13, 1994, and incorporated herein by reference. Thus, a different delay period could be selected for each range or zone of operation. An adjustable delay line may be used such as a ladder transconducting amplifier such as manufactured by National Semiconductor. The low-pass filter 402 could also be dynamically varied in conjunction with the delay period in order to compensate for the different expected frequencies at different ranges.

In some systems it may be desirable to include some delay response equalization to compensate for phase nonlinearities in some other part of the system. Delay equalization may be achieved by adjusting the delay elements 24 and 26 of the embodiment described earlier in FIGS. 3a-3f. FIG. 11 is a graph showing the various ranges of delay compensation that may be achieved by varying the value of the delay line resistors R85 and R86 (or resistors R87 and R91) from 24 kΩ to 43 kΩ. One or both of the delay elements 24 and 26 may be so adjusted for purposes of compensation. Generally, it can be seen from FIG. 11 that damping of delay response increases with larger values of the delay line resistors R85, R86, R87 and R91.

While the invention has thus far been described with reference to bar code label scanners, it is apparent that other systems requiring precise edge detection of analog signals may also benefit from use of the invention. In particular, the edge detection methods described herein may be advantageously applied to optical character recognition systems in which images are obtained by detecting reflected light and an electrical signal is generated in proportion to the detected light.

The methods and techniques described herein may also be implemented in the digital domain without departing from the principles of the invention. In particular, such implementations may utilize an analog-to-digital (A/D) converter and a microprocessor or finite state machine to perform the functions described previously. The input signal from the optical unit may be digitized by A/D conversion, and transitions detected in the digitized input signal by use of a microprocessor or similar computational device. The computational device preferably be embodied as a digital signal processor (DSP) chip. A DSP chip may be programmed to perform the filtering, delaying and summing operations (and the differentiation operations) heretofore described. Adaptation of analog circuit functions to an equivalent DSP program is well known.

While the invention has been particularly shown and described with reference to certain embodiments, it will be understood by those skilled in the art that various changes in form and detail may be made without departing from the spirit and scope of the invention. 

What is claimed is:
 1. A method for reading encoded images comprising the steps ofreceiving an input signal having different amplitude levels associated with binary information in an encoded image, generating a first derivative signal from said input signal, generating, independently of said step of generating said first derivative signal, a second derivative signal from said input signal, and generating a digital signal from said first derivative signal and said second derivative signal indicative of said binary information.
 2. The method of claim 1 further comprising the step of obtaining a plurality of samples of said input signal separated in time, wherein said step of generating a first derivative signal from said input signal comprises the step of algebraically combining a first set of said samples, and said step of generating a second derivative signal from said input signal comprises the step of algebraically combining a second set of said samples, such that the characteristics of said second derivative signal do not depend upon the characteristics of said first derivative signal.
 3. An apparatus for reading encoded images comprisingan optical detector, sampling means connected to said optical detector, first means connected to said sampling means for generating a first derivative signal, second means connected to said sampling means for generating a second derivative signal independently of said first derivative signal, and means for generating a digital signal from said first derivative signal and said second derivative signal.
 4. The apparatus of claim 3, wherein said first means comprises a first operational amplifier, and wherein said second means comprises a second operational amplifier.
 5. The apparatus of claim 4 wherein said first operational amplifier has a first set of weighted inputs in accordance with a first algebraic function, and said second operational amplifier has a second set of weighted inputs in accordance with a second algebraic function.
 6. A method for reading encoded images, comprising the steps ofobtaining an input signal from reading an encoded image, generating a plurality of time-separated samples of said input signal, deriving a second derivative from a first set of said samples, deriving a first derivative from a second set of said samples, said second set a subset of said first set, generating a threshold signal, comparing said first derivative signal with said threshold signal, and determining a plurality of valid zero crossing intervals thereby, detecting zero crossings of said second derivative signal, and determining which of said zero crossings represent valid signal transitions based on said valid zero crossing intervals.
 7. The method of claim 6 wherein said step of generating a plurality of time-separated samples of said input signal comprises the steps of delaying said input signal for a plurality of delay intervals, and sampling said input signal after each of said delay intervals.
 8. The method of claim 7 wherein said delay intervals are equal in time duration.
 9. The method of claim 6 wherein said first set of said samples comprises at least two samples, and said second set of said samples comprises at least one sample, said one sample also a member of said first set of said samples.
 10. The method of claim 9 wherein said step of deriving a second derivative from a first set of said samples comprises the step of algebraically combining said input signal and said at least two samples according to a first algebraic equation, and said step of deriving a first derivative from a second set of said samples comprises the step of algebraically combining said input signal and said at least one sample according to a second algebraic equation.
 11. The method of claim 10 wherein said first algebraic equation is A-2B+C and said second algebraic equation is A-C, wherein said input signal is designated by the variable A, a first of said at least two samples is designated by the variable B, and a second of said at least two samples is designated by the variable C, said second of said at least two samples being the same as said at least one sample.
 12. An apparatus for reading encoded images comprisingan optical detector, a first delay element connected to said optical detector, a second delay element connected to said first delay element, a first summer receiving as inputs said input signal and an output of said second delay element, a second summer receiving as inputs said input signal and outputs from each of said first delay element and said second is delay element, a peak detector coupled to said first summer, and a zero crossing detector coupled to said first summer, said second summer, and said peak detector.
 13. The apparatus of claim 12 wherein said first summer comprises a first operational amplifier configured to algebraically combine its inputs so as to generate a first signal approximating a first derivative of a signal output from said optical detector, and wherein said second summer comprises a second operation amplifier configured to algebraically combine its inputs so as to generate a second signal approximating a second derivative of said signal output from said optical detector.
 14. The apparatus of claim 13 wherein said zero crossing detector comprises comparison means connected to a threshold signal and said first signal, and detects a valid zero crossing of said second signal only during times when the magnitude of said first signal exceeds the magnitude of said threshold signal.
 15. The apparatus of claim 14 wherein said threshold signal is set as a percentage of an output of said peak detector.
 16. The apparatus of claim 12 further comprising a Gaussian filter connected between said optical detector and said first delay element.
 17. An apparatus for reading images comprisingan optical detector, a Gaussian filter connected to said optical detector, a double differentiator circuit connected to said Gaussian filter, said double differentiator characterized by relatively constant group delay, and a zero crossing detector coupled to said double differentiator.
 18. The apparatus of claim 17 wherein said Gaussian filter is a four-pole filter.
 19. The apparatus of claim 17 wherein said double differentiator comprises a plurality of delay elements, at least one of which is connected to said optical detector, whereby a plurality of delayed signals is generated, and an operational amplifier having said delayed signals as inputs and outputting an algebraic combination thereof.
 20. The apparatus of claim 17 wherein said zero crossing detector detects a valid zero crossing of an output of said double differentiator by detecting a first signal lobe preceding said zero crossing and a second signal lobe of opposite polarity following said zero crossing.
 21. An apparatus for reading labels bearing encoded information comprisingan optical detector adapted to receive light reflected from a bar code label, and generating an output signal thereby, a plurality of delay elements, each delay element comprising a plurality of operational amplifiers located on a single integrated chip, at least one of said delay elements connected to said output signal, a double differentiator circuit coupled to said delay elements, and generating a second derivative signal therefrom, a zero crossing detector coupled to said second derivative signal, and a decoder coupled to said zero crossing detector.
 22. The apparatus of claim 21 wherein said zero crossing detector detects a valid zero crossing of said second derivative signal by detecting a first signal lobe preceding said zero crossing and a second signal lobe of opposite polarity following said zero crossing.
 23. The apparatus of claim 21 further comprising a single differentiator circuit coupled to said delay elements and generating a first derivative signal therefrom, wherein said zero crossing detector detects a valid zero crossing of said second derivative signal only during periods when the magnitude of said first derivative signal exceeds a threshold level.
 24. The apparatus of claim 21 wherein said delay elements output a plurality of delayed signals, and wherein double differentiator comprises an operational amplifier outputting an algebraic combination of said delayed signals.
 25. A method for reading encoded images, comprising the steps ofgenerating an input signal by detecting light incident upon an encoded image, generating a threshold signal from said input signal, coupling said input signal to a series of delay elements, generating a first derivative signal using at least one of said delay elements, generating a second derivative signal using at least two of said delay elements, comparing said first derivative signal with said threshold signal and deriving a plurality of valid zero crossing intervals thereby, and detecting zero crossings of said second derivative signal during said valid zero crossing intervals, wherein generation of said threshold signal precedes the generation of said second derivative signal by an amount of time sufficient to allow said threshold signal to reach a minimum energy level.
 26. An apparatus for determining the occurrence of transitions in an input signal, comprising:an optical scanner for generating an input signal from a scanned bar code label, said optical scanner comprising a light source; a double differentiator for generating a signal representing an approximate second derivative of the input signal, said double differentiator having relatively constant group delay over an expected input frequency range; a detection circuit for detecting zero crossings of said second derivative signal indicative of transitions in the input signal; and means for simultaneously detecting a first signal portion of said second derivative signal exceeding a positive threshold and a second signal portion of said second derivative signal exceeding a negative threshold, whereby said detection circuit detects a valid transition when a zero crossing of said second derivative signal is surrounded by said first signal portion and said second signal portion. 